#pragma once

#include "common.h"
#include "../mapobjects/mapobject.h"
#include "resultlistmodel.h"

#include <QtCore/QString>
#include <QtGui/QDialog>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QListView>
#include <QtGui/QStringListModel>

class SearchDialog : public QDialog
{
Q_OBJECT
public:
	SearchDialog ( QWidget * parent );
	~SearchDialog ();

	void displaySearchResults ( vector<MapObject *> reuslts );

protected slots:
	void resizeEvent ( QResizeEvent * e );
	void onStrEntered ();

signals:
	void wantToFind ( QString & );

private:
	QLabel findLabel;
	QLineEdit leFind;
	QLabel resultLabel;
	QListView listView;

	QStringListModel * model;
	//ResultListModel * model;
};